﻿using AhCha.Fortunate.IService.DaMeng;
using AhCha.Fortunate.ModelsDto.DaMeng.ApiRequestLog;
using AhCha.Fortunate.ModelsDto;
using Microsoft.AspNetCore.Mvc;
using AhCha.Fortunate.Common.Const;

namespace AhCha.Fortunate.Api.Controllers.DaMeng
{

    /// <summary>
    /// 接口请求记录
    /// </summary>
    [ApiExplorerSettings(GroupName = SwaggerGroupName.SystemModules)]
    public class ApiRequestLogController : BaseApiController
    {
        readonly private IApiRequestLogService _apiRequestLogService;

        /// <summary>
        /// 
        /// </summary>
        public ApiRequestLogController(IApiRequestLogService apiRequestLogService)
        {
            _apiRequestLogService = apiRequestLogService;

        }

        /// <summary>
        /// 分页获取接口请求记录数据
        /// </summary>
        /// <param name="inpput"></param>
        /// <returns></returns>
        [HttpGet]
        public async Task<SqlSugarPagedList<ApiRequestLogOutput>> GetApiRequestLogPage([FromQuery] QueryApiRequestLogInpput inpput)
        {
            return await _apiRequestLogService.GetApiRequestLogPage(inpput);
        }


    }
}
